home *** CD-ROM | disk | FTP | other *** search
/ Video Toaster 4.3 / Video Toaster v4.3.iso / 3.1 / toasterall / arexx_examples / lwm / bbox.lwm < prev    next >
Text File  |  1993-06-08  |  800b  |  29 lines

  1. /* CMD: Bounding Box
  2.  * Display Bounding Box info, optionally create box for standin Obj.  */
  3. /* By Arnie Cachelin © 1993 NewTek Inc. */
  4.  
  5. libadd = addlib("LWModelerARexx.port",0)
  6. signal on error
  7. signal on syntax
  8. CurLay=curlayer()
  9. box=boundingbox()  /* Should check out empty list ...  */
  10. parse var box n x1 x2 y1 y2 z1 z2
  11. s1="!Layer "CurLay": " n" Points"
  12. s2="!Object Bounds"
  13. s3='@'x1 y1 z1
  14. s4='@'x2 y2 z2
  15. if notify(2,s1,s2,s3,s4,'!Create Bounding Box?',"(UNDO to remove object)") then do
  16.  /* Cut and Paste so that 'undo' will remove object, leave box */
  17.   call CUT()
  18.   call MAKEBOX(x1 y1 z1,x2 y2 z2)
  19.   call PASTE()
  20.   end
  21. if (libadd) then call remlib("LWModelerARexx.port")
  22. exit
  23.  
  24. syntax:
  25. error:
  26.     t=Notify(1,'!Rexx Script Error','@'ErrorText(rc),'Line 'SIGL)
  27.     if (libadd) then call remlib(mxx)
  28.     exit
  29.